//
//  CommonTools.swift
//  weibo
//
//  Created by Ning Xie on 16/8/11.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit
import SVProgressHUD


let exchangeRootVC = "exchangeRootVC"

//  通过随机数返回颜色对象
func RandomColor() -> UIColor {
    
    //  色值得取值范围0-255
    let red = random() % 256
    let green = random() % 256
    let blue = random() % 256
    
    
    // red ,green ,blue, alpha 他们的取值范围0-1之间
    return UIColor(red: CGFloat(red) / 255   , green: CGFloat(green) / 255 , blue: CGFloat(blue) / 255 , alpha: 1)
    
}

func ProgressStyle(){
    SVProgressHUD.setDefaultStyle(.Dark)
    SVProgressHUD.setDefaultMaskType(.Black)
    SVProgressHUD.setMinimumDismissTimeInterval(1)
    SVProgressHUD.setDefaultAnimationType(.Native)
    SVProgressHUD.setRingRadius(5)
}
